import request from "@/utils/request"

export function teachingMaterialList(query){
    return request({
        url: "/educational/teachingMaterial/list",
        method: "get",
        params: query
    });
}

export function teachingMaterialInfo(id) {
    return request({
        url: "/educational/teachingMaterial/info/" + id,
        method: "get"
    });
}

export function teachingMaterialAdd(data) {
    return request({
        url: "/educational/teachingMaterial/add",
        method: "post",
        data
    });
}

export function teachingMaterialUpdate(id, data) {
    return request({
        url: "/educational/teachingMaterial/update/" + id,
        method: "put",
        data: data
    });
}

export function teachingMaterialDelete(ids) {
    return request({
        url: "/educational/teachingMaterial/deleteByIds/" + ids,
        method: "delete",
    });
}

export function allSubjectList() {
    return request({
        url:"/educational/teachingMaterial/getAllSubject",
        method: "get",
    });
}